<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript">

	$(document).ready(function(){
		function addStudentSubmit(){
			$.post("/Class/addClass",$("#addStudentForm").serialize(), function(data,status){
				 alert("新增班级成功！");
				 window.location.href="./findClassById.jsp";
			  });
		}
		//点击
		$("#addStudentSubmit").click(function(){
			addStudentSubmit();
		});
	});
</script>
</head>
<center>
	<form id="addStudentForm">
		
			
				编号：<input type="text" name="id"><br>
				名称：<input type="text" name="classname"><br>
			
		<input type="button" id="addStudentSubmit" value="添加" />
	</form>
</center>
</html>